Fix TUI dropping live chat when resumable grid is hidden#445
Draft
cursor[bot] wants to merge 1 commit into
Draft
Fix TUI dropping live chat when resumable grid is hidden#445cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
The grid parity pass decoupled multiView from gridViewActive so a grid can stay resumable while the user chats in a single session. onChatEvent still keyed open sessions only on multiView tile ids, so live tokens, streaming state, and approval prompts were dropped for the active non-tile chat. Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug and impact
After the TUI grid parity pass (#444),
multiView(grid exists) was decoupled fromgridViewActive(grid is shown). Users can build a multi-tile grid, then open or create a single chat while the grid stays resumable in the background.Impact: Live chat events for the active single-chat session were silently dropped — frozen transcript, no streaming spinner, and missing tool-approval prompts (agent workflows could stall with no UI surface). Summary-only refresh still ran, so the bug looked like a stuck/frozen chat rather than a hard crash.
Trigger: Create a 2+ tile grid, then open a different chat from the drawer or start a new chat (grid hidden,
multiViewretained). Send a message and observe no live tokens/approvals until a full history hydrate.Root cause
onChatEventbuiltopenSessionIdsfrommultiView.tileswhenevermultiViewwas non-null, ignoringgridViewActive. Submit/scroll/selection already gated ongridViewActiveRef; the event subscription did not.Fix
resolveOpenChatSessionIds()inmultiChatLayout.ts(grid visible → tile ids; otherwise → active session only).onChatEventsubscription inapp.tsx.Validation
npx vitest run src/tuiClient/__tests__/multiChatLayout.test.ts(8 tests, including 3 new cases)Related open PRs (not duplicated)